#include<stdio.h>

void get_max_min(int const *arr, int n, int *max, int *min);
int main(int argc, char *argv[])
{
	int arr[10] = {1,2,3,4,5,6,7,8,9,0};
	int max_num;
	int min_num;

	get_max_min(arr, 10, &max_num, &min_num);
	printf("%d  %d\n", max_num, min_num);

	return 0;
}

void get_max_min(int const *arr, int n, int *max, int *min){
	int m, k;
	m = k =  arr[0];
	for(int i = 1; i < n; i++){
		if(arr[i] > m){
			m = arr[i];
		}else if(arr[i] < k){
			k = arr[i];
		}
	}
	*max = m;
	*min = k;
	return;
}


